package java实验三;

import java.util.Scanner;

public class 程序二 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.println("请输入想要转换的千米数：");
        double kgInput = scanner.nextDouble();

        double lbsFromKg = kgInput * 1.609; 

        System.out.println("千米转英里结果: " + lbsFromKg + "\n");

        

        
        int maxSteps = 40;

        for (int i = 1; i <= maxSteps; i++) {
            double kg = i;
            double lbs = kg * 1.609;
            System.out.printf("%-12.2f%-12.2f\t", kg, lbs);

           
            double lb = 5 * i;
            double kgBack = lb / 1.609;
            if (i < maxSteps) { 
                System.out.printf("%-12.2f%-12.2f%n", lb, kgBack); 
            } else {
                System.out.printf("%-12.2f%n", lb); 
            }
        }

        scanner.close();
    }
}